import request from '@/utils/request'

export function login(data) {
  return request({
    // url: '/vue-element-admin/user/login',
    url: '/api/account/login',
    method: 'post',
    data
  })
}

export function uploadFiles(data) {
  return request({
    url: '/api/upload/uploadFiles',
    method: 'post',
    data
  })
}


export function getInfo(token) {
  return request({
    url: '/api/account/getAdminInfo',
    method: 'post',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/api/account/logout',
    method: 'post'
  })
}

// 创建和修改员工信息
export function personCreate(data) {
  return request({
    url: '/api/user/create',
    method: 'post',
    data
  })
}

// 获取员工列表
export function getPersonList(data) {
  return request({
    url: '/api/user/getPersonList',
    method: 'post',
    data
  })
}

// 查询员工信息
export function getPersonInfo(data) {
  return request({
    url: '/api/user/getPersonInfo',
    method: 'post',
    data
  })
}

// 删除员工信息
export function delPersonInfo(params) {
  return request({
    url: '/api/user/delPersonInfo',
    method: 'get',
    params
  })
}
